package com.jeesite.modules.mo.entity;

import javax.validation.constraints.Size;

import com.jeesite.common.entity.BaseEntity;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.ic.entity.IcUser;
import com.jeesite.modules.rt.entity.*;
import com.jeesite.modules.sys.entity.Employee;

import java.util.List;
import java.util.Map;

/**
 * 用户设备Entity
 * @author 李寒冰
 * @version 2024-10-22
 */
@Table(name="mo_user_device", alias="a", label="用户设备信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="user_id", attrName="userId", label="用户ID"),
		@Column(name="device_id", attrName="deviceId", label="设备ID"),
		@Column(name="sn", attrName="sn", label="SN"),
		@Column(name="yester_icome", attrName="yesterIcome", label="昨日收益"),
		@Column(name="group_id", attrName="groupId", label="分组ID"),
		@Column(name="sum_icome", attrName="sumIcome", label="总收益"),
		@Column(name="beizhu", attrName="beizhu", label="备注"),
	},joinTable = {
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= RtDevice.class, alias="b",
		on="a.sn = b.sn",attrName="device",
		columns={@Column(includeEntity= RtDevice.class)}
	)}, orderBy="a.id DESC"
)
public class MoUserDevice extends DataEntity<MoUserDevice> {
	
	private static final long serialVersionUID = 1L;
	private String userId;		// 用户ID
	private String deviceId;		// 设备ID
	private String sn;		// SN
	private Double yesterIcome;		// 昨日收益
	private String groupId;		// 分组ID
	private Double sumIcome;		// 总收益
	private String beizhu;


	//扩展字段
	private Map<String,Object> map;
	private RtDeviceLine rtDeviceLine;
	private RtDevice device;
	private List<RtDeviceUpdown> listUpDown;
	private RtDeviceHardware rtDeviceHardware;

	public String getBeizhu() {
		return beizhu;
	}

	public void setBeizhu(String beizhu) {
		this.beizhu = beizhu;
	}

	public RtDeviceHardware getRtDeviceHardware() {
		return rtDeviceHardware;
	}

	public void setRtDeviceHardware(RtDeviceHardware rtDeviceHardware) {
		this.rtDeviceHardware = rtDeviceHardware;
	}

	public RtDeviceLine getRtDeviceLine() {
		return rtDeviceLine;
	}

	public void setRtDeviceLine(RtDeviceLine rtDeviceLine) {
		this.rtDeviceLine = rtDeviceLine;
	}

	public Map<String, Object> getMap() {
		return map;
	}

	public void setMap(Map<String, Object> map) {
		this.map = map;
	}

	public List<RtDeviceUpdown> getListUpDown() {
		return listUpDown;
	}

	public void setListUpDown(List<RtDeviceUpdown> listUpDown) {
		this.listUpDown = listUpDown;
	}

	public RtDevice getDevice() {
		return device;
	}

	public void setDevice(RtDevice device) {
		this.device = device;
	}

	public MoUserDevice() {
		this(null);
	}
	
	public MoUserDevice(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="用户ID长度不能超过 50 个字符")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	@Size(min=0, max=50, message="设备ID长度不能超过 50 个字符")
	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	
	@Size(min=0, max=255, message="SN长度不能超过 255 个字符")
	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}
	
	public Double getYesterIcome() {
		return yesterIcome;
	}

	public void setYesterIcome(Double yesterIcome) {
		this.yesterIcome = yesterIcome;
	}
	
	@Size(min=0, max=50, message="分组ID长度不能超过 50 个字符")
	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	
	public Double getSumIcome() {
		return sumIcome;
	}

	public void setSumIcome(Double sumIcome) {
		this.sumIcome = sumIcome;
	}
	
}